<#include "../../select.ftl" />
<!-- Modal -->
<div class="modal-body">
    <div id="errorMessage"><#include "../../message.ftl" /></div>
    <form class="form-horizontal" role="form" id="menuForm" method="post"
          action="${absoluteContextPath}/system/menu/save">
    <#if menu??>
        <#if menu.id??>
            <input type="hidden" name="id" value="${menu.id}"/>
        <#else>
            <input type="hidden" name="id" value=""/>
        </#if>
    </#if>
        <div class="row">
            <input name="menuId" value="${(menu.menuId)!''}" type="hidden" class="form-control"/>

            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">菜单名称<sup style="color: red">*</sup></label>

                <div class="col-sm-6">
                    <input name="menuName" value="${(menu.menuName)!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">菜单地址</label>

                <div class="col-sm-6">
                    <input name="menuUrl" id="menuUrl" value="${(menu.menuUrl)!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">图标配置</label>

                <div class="col-sm-6">
                    <input name="imageConfig" id="imageConfig" value="${(menu.imageConfig)!''}" type="text"
                           class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">上级菜单ID<sup style="color: red">*</sup></label>

                <div class="col-sm-6">
                    <input name="parentMenuId" id="parentMenuId" value="${(menu.parentMenuId)!''}" type="text"
                           readonly="readonly" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">是否可见<sup style="color: red">*</sup></label>

                <div class="col-sm-6">
                <@select name="isVisible" value="${(menu.isVisible)!1}" list=yesOrNoTypeList class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">排序号</label>

                <div class="col-sm-6">
                    <input name="sortNo" value="${(menu.sortNo)!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">备注</label>

                <div class="col-sm-6">
                    <textarea name="remark" rows="6" cols="25" style="width: 100%">${(menu.remark)!''}</textarea>

                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>

                <div class="col-sm-8">
                    <button type="button" class="btn btn-primary" onclick="save();">保存</button>
                </div>

            </div>

        </div>
    </form>
</div>

<script>
    $(function () {
        $(".chosen-select").chosen({disable_search_threshold: 10});
    });

</script>